<template>
    <div>
      输入手机号<input v-model="mobile">
      <button @click="binMobile()">绑定</button>
    </div>
  </template>
  
  <script>
  export default {
    data() {
      return {
        mobile:"",
        uid: '',
        token:''
      };
    },
    methods:{
      binMobile(){
        var data = {"mobile":this.mobile,"uid":this.$route.query.uid,"token":this.$route.query.token}
        this.axios.post("user/binMobile",data).then(res =>{
          var data = res.data
          var userid = data.userid
          var token = data.token
          localStorage.setItem('userid',userid)
          localStorage.setItem('token',token)
          window.location.href="http://localhost:8080/#/"
        })
      }
  
    }
  }
  </script>
  
  <style>
  
  </style>